package Day10;

import java.util.Scanner;

/**
 * Creat with IntelliJ IDEA
 * Description
 * User: mamba24
 * Date: 2022-09-22
 * Time: 9:28
 * To BE A Better Person-2020-3-2
 */
public class TestDemo01 {
    private static boolean isNum(char c){
        return c >= 48 && c <= 57;
    }
    private static boolean isBigAlp(char c){
        return c >= 65 && c <= 90;
    }
    private static boolean isSmallAlp(char c){
        return c >= 97 && c <= 122;
    }
    //密码长度
    public static int calLength(String sec){
        int length=sec.length();
        if(length <= 4){
            return 5;
        }
        if(length <= 7){
            return 10;
        }
        return 25;
    }
    //大写65-90
    // 小写97-122
    //密码字母
    public static int calAlph(String sec){
        int alnum=0;
        int bigal=0;
        for (int i = 0; i < sec.length(); i++) {
            if(isBigAlp(sec.charAt(i))){
                alnum++;
                bigal++;
            }
            if(isSmallAlp(sec.charAt(i))){
                alnum++;
            }
        }
        if(alnum == 0){
            return 0;
        }else if(bigal == 0){
            return 10;
        }else if(bigal != sec.length()){
            return 20;
        }
        return 0;
    }

    //密码数字
    //48-57
    public static int calNum(String sec){
        int Nnum=0;
        for (int i = 0; i < sec.length(); i++) {
            if(isNum(sec.charAt(i))){
                Nnum++;
            }
        }
        if(Nnum == 0){
            return 0;
        }else if(Nnum == 1){
            return 10;
        }else{
            return 20;
        }
    }


    //计算符号
    public static int calSimple(String sec){
        int Snum=0;
        for (int i = 0; i < sec.length(); i++) {
            if(!isNum(sec.charAt(i)) && !isSmallAlp(sec.charAt(i)) && !isBigAlp(sec.charAt(i))){
                Snum++;
            }
        }
        if(Snum == 0){
            return 0;
        }else if(Snum == 1){
            return  10;
        }else {
            return 20;
        }
    }

    public static int Bonus(String sec){
        if(calNum(sec)>=10 && calAlph(sec)>=20 && calSimple(sec)>10){
            return 5;
        }else if(calNum(sec)>=10 && calAlph(sec)>=10 && calSimple(sec)>10){
            return 3;
        }else if(calNum(sec)>=10 && calAlph(sec)>=10){
            return 2;
        }
        return 0;
    }
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String sec=sc.nextLine();
        int sum=calLength(sec)+calSimple(sec)+calAlph(sec)+calNum(sec);
        if(sum >= 90){
            System.out.println("VERY_SECURE");
        }else if(sum >= 80){
            System.out.println("SECURE");
        }else if(sum >= 70){
            System.out.println("VERY_STRONG");
        }else if(sum >= 60){
            System.out.println("STRONG");
        }else if(sum >= 50){
            System.out.println("AVERAGE");
        }else if(sum >= 25){
            System.out.println("WEAK");
        }else {
            System.out.println("VERY_WEAK");
        }
//        char c=sc.next().charAt(0);
//        boolean ret=isSmallAlp(c);
//        System.out.println(ret);
    }
}
